<%= render partial: 'shipit/stacks/header', locals: { stack: @stack } %>

<div class="wrapper">
  <section>
    <header class="section-header">
      <h2>Commits included in this deploy (<%= link_to_github_deploy(@deploy) %>)</h2>
    </header>

    <%= render 'shipit/deploys/summary', commits: @deploy.commits %>
  </section>

  <% unless @deploy.commits_since.empty?  %>
    <section class="less-important">

      <p>The following commits are <strong>not</strong> included in this deploy.
      Please ensure that none of these commits are needed for what
      <strong>is</strong> being deployed (for example, if they contain the revert
      of a broken change).</p>

      <%= render 'shipit/deploys/summary', commits: @deploy.commits_since %>
    </section>
  <% end %>

  <%= render_monitoring @stack %>

  <%= render_checks @commit %>

  <%= render_checklist @stack.checklist %>

  <%= form_for [@stack, @deploy] do |f| %>
    <%= render partial: 'shipit/variables', locals: { variables: @deploy.variables, form: f, header: "Environment Variables", field_name: :env}  %>

    <%= render 'concurrent_deploy_warning' if @stack.active_task? %>

    <section class="submit-section">
      <%= f.hidden_field :until_commit_id %>
      <%= f.submit class: 'btn btn--primary btn--large trigger-deploy' %>
    </section>
  <% end %>
</div>
